package com.zking.controller;

import com.zking.entity.ProductOne;
import com.zking.service.FenleiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("fenlei")
public class FenleiController {

    @Autowired
    FenleiService fenleiService;

    @RequestMapping("findAll")
    @ResponseBody
    public List<ProductOne> find(){
        return fenleiService.findOneAndTwo();
    }
}
